package com.ktv.ks.controller;

import com.ktv.ks.common.vo.R;
import com.ktv.ks.service.intf.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller //IOC创建对象
@RequestMapping("/api/admin")
public class AdminController {
    @Autowired
    private AdminService service;

    @RequestMapping("login.do")
    @ResponseBody
    public R login(String name, String password, HttpSession session){
        System.out.println(name);
        System.out.println(password);
        return service.login(name, password, session);
    }
}
